#!/bin/bash

# 构建镜像
docker build -t user-crud-app-alone .

# 运行容器
docker run -d \
  --name user-crud-app-alone \
  -p 8081:8081 \
  -e DB_TYPE=mysql \
  -e DB_HOST=host.docker.internal \
  -e DB_PORT=3306 \
  -e DB_USER=dynamic_user \
  -e DB_PASSWORD=dynamic_password \
  -e DB_NAME=dynamic_db \
  --add-host=host.docker.internal:host-gateway \
  user-crud-app-alone 